﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FireStarter.CodeGeneration.Generator;

namespace FireStarter.CodeGeneration.Parser
{
    public abstract class ActionParserBase : IActionParser
    {
        private readonly ITemplateLoader _templateLoader;

        public ActionParserBase(ITemplateLoader templateLoader) {
            _templateLoader = templateLoader;
        }

        protected ITemplateLoader TemplateLoader { get { return _templateLoader; } }

        public abstract TemplateExpression Parse(ref string templateText, List<IActionParser> actionParsers);
        public abstract bool IsExpressionMatch(string text);
    }
}
